<%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <html>

    <head>
        <title>业主登录</title>
        <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
        <style>
            body {
                background-color: #f8f9fa;
                height: 100vh;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            .login-container {
                background: white;
                padding: 2rem;
                border-radius: 10px;
                box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
                width: 100%;
                max-width: 400px;
            }

            .form-group {
                margin-bottom: 1rem;
            }
        </style>
    </head>

    <body>
        <div class="login-container">
            <h2 class="text-center mb-4">物业管理系统</h2>
            <form action="login" method="post">
                <div class="form-group">
                    <label class="form-label">用户名</label>
                    <input type="text" class="form-control" name="username" required>
                </div>
                <div class="form-group">
                    <label class="form-label">密码</label>
                    <input type="password" class="form-control" name="password" required>
                </div>
                <div class="d-grid gap-2">
                    <button type="submit" class="btn btn-primary">登录</button>
                    <a href="register.jsp" class="btn btn-secondary">注册新用户</a>
                    <a href="admin/adminLogin.jsp" class="btn btn-outline-secondary">管理员登录</a>
                </div>
            </form>
            <% if(request.getAttribute("error") !=null) { %>
                <div class="alert alert-danger mt-3">
                    <%= request.getAttribute("error") %>
                </div>
                <% } %>
        </div>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    </body>

    </html>